
/**
 * The class MultiplyOp extends the class BinaryOp and represents the multiplication operation
 * @author Michael Fildstein, ID: 309161594     
 * @author Tomer Ben Rachel ID: 021982475     
 */


public class MultiplyOp extends BinaryOp{

	private String sign = "*";
	private double ans;
	private double precedence = 2;
 
/**
 * The method operate receives two double data type parameters and returns the result of the multiplication of the two parameters
 * @param left A double data type representing a number
 * @param right  A double data type representing a number
 * @return A double data type representing the multiplication between the two parameters
 */
  


	public double operate(double left, double right){
		this.ans = left * right;
		return ans;
		
	}
	
  
/**
 * The method toString returns a string representing the multiplication sign
 * @return a string data type representing the multiplication sign
 */     
  
	public String toString(){
		return sign;
	}
	
	public double getPrecedence() {
		return precedence;
	}
}

